Skip to content

[6.x] Remove stale PHPStan ignore patterns - #15083

Merged
jasonvarga merged 1 commit into
6.xfrom
remove-stale-phpstan-ignores
Jul 29, 2026
Merged

[6.x] Remove stale PHPStan ignore patterns#15083
jasonvarga merged 1 commit into
6.xfrom
remove-stale-phpstan-ignores

Conversation

@duncanmcclean

@duncanmcclean duncanmcclean commented Jul 27, 2026

Copy link
Copy Markdown
Member

This pull request removes two stale PHPStan ignore patterns for CollectionsServiceProvider. They've been failing CI on multiple pull requests this morning.

The patterns were ignoring method.protected/property.protected errors for the keyByWithKey macro's use of Collection::valueRetriever() and $items. Neither error is reported any more: PHPStan 2.2.6 resolves static/self/parent relative to the @param-closure-this bound class, and Macroable::macro() is annotated with @param-closure-this static $macro, so the closure is now analysed in Illuminate\Support\Collection's own scope — where reaching for its protected internals is perfectly valid.

Since reportUnmatchedIgnoredErrors is enabled by default, the two now-unmatched patterns fail the run.

This PR fixes it by removing them.

PHPStan no longer reports the `valueRetriever()`/`$items` errors for the
`keyByWithKey` macro in `CollectionsServiceProvider`, so the ignore patterns
for them go unmatched and fail the run.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@jasonvarga
jasonvarga merged commit 4bad1c1 into 6.x Jul 29, 2026
26 checks passed
@jasonvarga
jasonvarga deleted the remove-stale-phpstan-ignores branch July 29, 2026 13:21
edalzell pushed a commit to edalzell/cms that referenced this pull request Jul 31, 2026
add queue timeout config to search index update job
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants